﻿using Fishing.Common;
using System;
using System.Globalization;
using System.Windows.Data;

namespace Fishing.Converter
{
    class IncreaseAlgorithmEnumValueConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is IncreaseAlgorithm mode)
            {
                return mode switch
                {
                    IncreaseAlgorithm.Direct => Properties.Lang.OptionIncreaseAlgorithmDirect,
                    IncreaseAlgorithm.Linear => Properties.Lang.OptionIncreaseAlgorithmLinear,
                    IncreaseAlgorithm.Easing => Properties.Lang.OptionIncreaseAlgorithmEasing,
                    _ => throw new NotImplementedException(),
                };
            }

            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
